﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MessageSystem.Managed.Infrastructure;

namespace MessageSystem.Managed.Interface
{
    public delegate void OnAccept(IMessageChannel mc);
    public delegate void OnConnectSuccess(IMessageChannel mc);
    public delegate void OnConnectFailed();      

    public interface IMessageSystem
    { 
        void Create(Options op);

        void ListenLocalSystem(String ip, UInt16 port, OnAccept a);

        void ConnectRemoteSystem(String ip, UInt16 port, OnConnectSuccess s, OnConnectFailed f);

        void Poll(Int32 wait);
    }
}
